package com.qingke.easyjava.besuper2.command;

import java.util.HashMap;
import java.util.Map;

import com.qingke.easyjava.besuper2.command.impi.ExitCommand;
import com.qingke.easyjava.besuper2.command.impi.HelpCommand;
import com.qingke.easyjava.besuper2.command.impi.LoginCommand;
import com.qingke.easyjava.besuper2.command.impi.SignupCommand;

public class SystemCommandFactory extends CommandFactory {
	private static Map<CommandCode, Command> cmdMap = new HashMap<CommandCode, Command>(); 
	
	static {
		cmdMap.put(CommandCode.EXIT, new ExitCommand());
		cmdMap.put(CommandCode.HELP, new HelpCommand());
		cmdMap.put(CommandCode.LOGIN, new LoginCommand());
		cmdMap.put(CommandCode.SIGNUP, new SignupCommand());
	}
	
	public Command buildCommand(CommandCode cc) {
		return cmdMap.get(cc);
	}
}
